home *** CD-ROM | disk | FTP | other *** search
- @echo off
- if "%1"=="" goto help
- if not exist %1 goto no_file
- echo %1 is a diskfile
- goto end
- :no_file
- if not exist %1\nul goto no_subdir
- if exist %1\*.* echo %1 is a non-empty subdirectory
- if not exist %1\*.* echo %1 is an empty subdirectory
- goto end
- :no_subdir
- echo %1 does not exist
- goto end
- :help
- echo CHKEXIST by Jim Groeneveld, NL, 21/3-91.
- echo Checks existence (or not) of some name as a disk file or subdirectory.
- echo Syntax: CHKEXIST name
- echo Output: textual report of existence, adapt for specific purposes.
- :end
-